第 8 步:很好!现在让我们向用户询问星星的颜色。

input()控制台的ask()版本,它请求用户输入,并将其存储为string

  • ,拖动get_user_input()内缩进的Input Text
  • 更改"What is your name?""What color should the stars be?" .
  • 然后,将=符号左侧的变量从my_varcolor

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)